import React from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import { List, Icon } from 'antd-mobile';
import content from '../../../common/contentCss/content.css';
import CustTitle from '../../../common/title/title';
import SetMyWalletView from './pages/setMyWallet';
import CustomsItemNoIcon from '../../../../../common/items/CustomsItemNoIcon';
import Line from '../../../../../common/borderLine/Line';



function SetMyWallet({dispatch,loading}) {
  const titleProps = {
    titleName:'钱包设置',
    goBack(){
      history.go(-1);
    }
  }
  const ChangePassword = {
    textName:'修改支付密码',
    onOk(title){
      console.log('修改支付密码');
      dispatch({
        type:'putPassword/querySuccess',
        payload:{
          title: '修改支付密码',
          status: 'oldPassword'
        }
      })
      dispatch(routerRedux.push({
        pathname: '/put-password',
      }));
    },
  }
  const ForgetPassword = {
    textName:'忘记支付密码',
    onOk(title){
      console.log('忘记支付密码');
      dispatch({
        type:'putPassword/querySuccess',
        payload:{
          title: '忘记支付密码',
          status: 'forgetPassword'
        }
      })
      dispatch(routerRedux.push({
        pathname: '/put-password',
      }));
    },
  }

  const MarginHeight = () => <div style={{height: '0.6em', backgroundColor:'#F5F5F9'}}></div>;

  return(
    <div className={content.content}>
      <CustTitle {...titleProps}/>
      <div style={{
        marginTop: '2.8125em',
      }}>
      </div>

      <CustomsItemNoIcon {...ChangePassword} />
      <Line />
      <CustomsItemNoIcon {...ForgetPassword} />


    </div>
  )
}

function mapStateToProps(state, ownProps) {
  return {

  }
}

export default connect(mapStateToProps)(SetMyWallet);
